<?php
/**
*	Search and call of Model class 
*
*	@author Renan Henrique Abreu <renanhabreu@gmail.com>
*	@date 20-07-2009
*	@version 2.0
* 	@final
*	@package Nucleo
* 	@subpackage Nucleo.Load
*   @copyright 2009 Renan Abreu
*/
final class Nucleo_Load_Model implements Nucleo_Load_Interface{
	
	private function __construct(){}
	
	
	static public function findClass($class){
		$class = str_replace('_','/',$class);
		       
        $model = MODULE_PATH
               . Nucleo_Controller_Factory::$modulo
               .'/Model/'.$class.'.php';
       
        $publicModel =  MODULE_PATH.'Model/'.$class.'.php';
       
        if(file_exists($model))
            require($model);
        elseif(file_exists($publicModel))
            require($publicModel);
        else
            return false;
            
        return true;
	}
}
?>